﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Models;
using Common;

namespace Workflow.Project
{
    public partial class SearchNode2 : System.Web.UI.Page
    {
        private PJSearchManager objPJSearch = new PJSearchManager();
        public List<PJNodeShow> resultList = new List<PJNodeShow>();
        public SearchChoose objSearchChoose = new SearchChoose();
       
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            PJSearch pjSearch = new PJSearch()
            {
                PJId = txtNo1.Text.ToString().Trim().ToUpper(),
                CreateTime1 = txtCreateTime1.Text.Trim() == "" ? Convert.ToDateTime("1900-01-01") : Convert.ToDateTime(txtCreateTime1.Text.Trim()),
                CreateTime2 = txtCreateTime2.Text.Trim() == "" ? Convert.ToDateTime("1900-01-01") : Convert.ToDateTime(txtCreateTime2.Text.Trim()),
                CreaterName = txtPJCreater.Text.ToString().Trim(),
            };

            resultList = objPJSearch.GetNode(pjSearch);

        }

        protected void ddlSelect_SelectedIndexChanged(object sender, EventArgs e)
        {
            string msgForm = objSearchChoose.Choose(ddlSelect);
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "", msgForm);
        }
    }
}